package com.bs.music.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import com.bs.music.R;

public class GroupAdapter extends SetBaseAdapter<String> {

	protected Context context;
	
	public GroupAdapter(Context context) {
		this.context = context;
	}
	
	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		if(convertView == null) {
			convertView = LayoutInflater.from(context).inflate(R.layout.list_item, null);
			ImageView imageView = (ImageView)convertView.findViewById(R.id.icon);
			imageView.setBackgroundResource(R.drawable.ic_root_user);
		}
		
		TextView text = (TextView)convertView.findViewById(R.id.text);
		String item = getItem(position).toString();
		text.setText(item);
		return convertView;
	}
	
}
